package com.tony.mywork.huju.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Notify {
	
	private final static Logger log = LoggerFactory.getLogger(Notify.class);
	
	public final static String url = "http://sms.253.com/msg/send";
	public final static String param = "rd=true&un=N6722401&pw=ian4d7P380b78a";
	
	public static void sendMsg(String phonenumber, String msg) {
		String fullParam = param + "&phone=" + phonenumber + "&msg=" + msg;
		
		try {
			String retJson = HttpSendUtil.sendPost(url, fullParam);
			
			log.info("短信发送成功, 号码:" + phonenumber + ",内容:" + msg + ", 发送状态:" + retJson);
		} catch (Exception e) {
			log.error("短信发送失败", e);
		}
	}

}
